#include <stdio.h>
#include <string.h>

#define MAXSIZE 81

int main() {
	setbuf(stdout, NULL);


	// NOTE: Variable declaration
	// STEP: 声明words_list，用于逐单词存放用户输入的数据
	char sysInput[MAXSIZE], *split[MAXSIZE];

	// STEP: 声明count，用于存放用户输入的单词个数
	int count = 0;


	// NOTE: Inputs
	// STEP: 获取用户全部输入
	gets(sysInput);


	// NOTE: Process
	// STEP: 按空格拆分用户输入
	do {
		if (count == 0) {
			split[count] = strtok(sysInput, " ");
		} else {
			split[count] = strtok(NULL, " ");
		}
	} while (split[count++]);



	// NOTE: Outputs
	for (int i = count - 2; i >= 0; --i) {
		if (i != 0) {
			printf("%s ", split[i]);
		} else {
			printf("%s", split[i]);
		}
	}

	// NOTE: Ending
	return 0;
}